package com.yyfax.pay.config.model.to;

import org.apache.commons.lang3.StringUtils;

import com.yyfax.framework.exception.YYException;
import com.yyfax.framework.model.Params;
import com.yyfax.framework.yyfax.enums.RspCodeEnum;

/**
 * 新增银行信息参数
 * 
 * @author changxd
 * @date 2017-04-13
 * @since 1.0.0
 */
@SuppressWarnings("serial")
public class BankConfigSaveParams extends Params {

	/** 银行编号 bank_code */
	private String bankCode;
	/** 银行名称 bank_name */
	private String bankName;
	/** 银行缩写 en_name */
	private String bankEnname;
	/** 状态 state */
	private String state;
	/** 备注 remark */
	private String remark;
	/** 创建时间 createTime */
	private String createTime;
	/** 英文名称 enname */
	private String enname;

	@Override
	public boolean validate() throws Exception {

		if (StringUtils.isBlank(bankCode)) {
			throw new YYException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "参数 'bankCode'不能为空");
		}
		if (StringUtils.isBlank(bankName)) {
			throw new YYException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "参数 'bankName'不能为空");
		}
		if (StringUtils.isBlank(bankEnname)) {
			throw new YYException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "参数 'bankEnname'不能为空");
		}
		if (StringUtils.isBlank(state)) {
			throw new YYException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "参数 'state'不能为空");
		}
		if (StringUtils.isBlank(remark)) {
			throw new YYException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "参数 'remark'不能为空");
		}
		return true;
	}

	public String getBankCode() {
		return bankCode;
	}

	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}

	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public String getBankEnname() {
		return bankEnname;
	}

	public void setBankEnname(String bankEnname) {
		this.bankEnname = bankEnname;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getEnname() {
		return enname;
	}

	public void setEnname(String enname) {
		this.enname = enname;
	}

}
